<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin - <?php echo $title_for_layout;?></title>
<?php echo $html->css('admin/theme');?>
<?php echo $html->css('admin/style');?>
<?php echo $html->script('jquery.js');?>

<script>
   var StyleFile = "theme" + document.cookie.charAt(6) + ".css";
   document.writeln('<link rel="stylesheet" type="text/css" href="css/' + StyleFile + '">');
</script>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/ie-sucks.css" />
<![endif]-->
</head>

<body>
	<div id="container">
    	<div id="header">
        	<h2>TRANG QUẢN LÝ RAO VẶT</h2>
		<?php echo $this->element('admin_top_menu'); ?>
      </div>
        <div id="top-panel">
            <div id="panel">
                <ul>
                    <li>
						<?php 
							echo $html->image('admin/icons/house.png');
							echo $html->link('Trang chủ', array('controller' => 'posts', 'action' => 'index', 'admin' => 0)); 
						?>
					</li>
					<li>
						<?php 
							echo $html->image('admin/icons/logout.png');
							echo $html->link('Đăng xuất ['. $session->read('Auth.User.username').']', array('controller' => 'users', 'action' => 'logout', 'admin' => 0)); 
						?>
					</li>
                </ul>
            </div>
      </div>
        <div id="wrapper">
            <div id="content">
				<?php echo $this->Session->flash(); ?>
				<?php echo $content_for_layout; ?>
            </div>
            <div id="sidebar">
  				<ul>
                	<li>
						<h3><?php echo $html->link('Tổng quan', array('controller' => 'dashboard', 'action' => 'index', 'admin' => 1), array('class' => 'house')); ?></h3>
                    </li>
                    <li>
						<h3>
							<?php echo $html->link('Danh mục', array('controller' => 'categories', 'action' => 'index'), array('class' => 'category')); ?>
						</h3>
          				<ul>
							<li>
							<?php echo $html->link('Tạo danh mục mới', array('controller' => 'categories', 'action' => 'index')); ?>
							</li>
                        </ul>
                    </li>
					<li>
						<h3><?php echo $html->link('Tin rao', array('controller' => 'posts', 'action' => 'index', 'admin' => 1), array('class' => 'post')); ?></h3>
					</li>
					<li><h3><?php echo $html->link('Thành viên', array('controller' => 'users', 'action' => 'index', 'admin' => 1), array('class' => 'user')); ?></h3>
          				<ul>
                            <li><?php echo $html->link('Thêm thành viên', array('controller' => 'users', 'action' => 'add', 'admin' => 1), array('class' => 'useradd')); ?></li>
                            <li><?php echo $html->link('Nhóm thành viên', array('controller' => 'groups', 'action' => 'index', 'admin' => 1), array('class' => 'group')); ?></li>
                        </ul>
                    </li>
				</ul>       
          </div>
      </div>
        <div id="footer">
        <div id="credits">
   		RaovatBkdn.vn
        </div>
		<br />

        </div>
</div>
</body>
</html>
